﻿@model QuanLyGiaoVuUI.Models.LopMonHoc.DeTaiViewModel
@{
    Layout = null;
    }
<script src="~/Scripts/jquery.unobtrusive-ajax.min.js"></script>
@using (Ajax.BeginForm("XacNhanDeTai","LopMonHoc", new AjaxOptions{
     HttpMethod="POST",
     LoadingElementId="LoadingImage",
     OnSuccess="XacNhanThanhCong"
})){
    <input type="hidden" name="maDeTai" value="@Model.MaDeTai" />
    <input type="hidden" name="datYeuCau" value="false" />
    
    <table>
        <tr>
            <td>
                Lý do hủy:
            </td>
            <td>
                <textarea name="lyDoHuy"></textarea>
            </td>
        </tr>
    </table>
    <input type="submit" id="btnSubmitHuyDeTai" style="display:none"/>
}

<script>
    function XacNhanThanhCong(data) {
        if (data.success) {
            ToastManager.showSuccessToast("Hủy đề tài thành công.");
        }
        else {
            ToastManager.showStickyWarningToast(data.message);
        }
        CloseDialog("#huyDeTaiDialog");
    }
</script>
